using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._3DIntersections
{
    /// <summary>
    /// <para>Intersect 3D Lines</para>
    /// <para>Computes the intersecting and overlapping segments of lines in 3D space.</para>
    /// <para>计算 3D 空间中线的相交和重叠线段。</para>
    /// </summary>    
    [DisplayName("Intersect 3D Lines")]
    public class Intersect3DLines : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Intersect3DLines()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_lines">
        /// <para>Input Features</para>
        /// <para>The line features that will be evaluated for intersections. The input can consist of either one or two line feature layers or classes. If one input is specified, each feature will be compared with all other features in that feature class. No feature will be compared to itself.</para>
        /// <para>将评估相交点的线要素。输入可以由一个或两个线要素图层或类组成。如果指定了一个输入，则每个要素将与该要素类中的所有其他要素进行比较。不会将任何功能与自身进行比较。</para>
        /// </param>
        public Intersect3DLines(List<object> _in_lines)
        {
            this._in_lines = _in_lines;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Intersect 3D Lines";

        public override string CallName => "3d.Intersect3DLines";

        public override List<string> AcceptEnvironments => ["XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "extent", "geographicTransformations", "outputCoordinateSystem", "parallelProcessingFactor", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_lines, _max_z_diff, _join_attributes.GetGPValue(), _out_point_fc, _out_line_fc, _out_intersection_count];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The line features that will be evaluated for intersections. The input can consist of either one or two line feature layers or classes. If one input is specified, each feature will be compared with all other features in that feature class. No feature will be compared to itself.</para>
        /// <para>将评估相交点的线要素。输入可以由一个或两个线要素图层或类组成。如果指定了一个输入，则每个要素将与该要素类中的所有其他要素进行比较。不会将任何功能与自身进行比较。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_lines { get; set; }


        /// <summary>
        /// <para>Maximum Z Difference</para>
        /// <para>The maximum vertical distance between line segments that intersect.</para>
        /// <para>相交的线段之间的最大垂直距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Z Difference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _max_z_diff { get; set; } = null;


        /// <summary>
        /// <para>Attributes To Join</para>
        /// <para><xdoc>
        ///   <para>Specifies which attributes from the input features will be transferred to the output feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>All attributes—All the attributes from the input features will be transferred to the output feature class. This is the default.</bullet_item><para/>
        ///     <bullet_item>All attributes except feature IDs—All the attributes except the FID from the input features will be transferred to the output feature class.</bullet_item><para/>
        ///     <bullet_item>Only feature IDs—Only the FID field from the input features will be transferred to the output feature class.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入要素中的哪些属性将传输到输出要素类。</para>
        ///   <bulletList>
        ///     <bullet_item>所有属性—输入要素中的所有属性都将传输到输出要素类。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>除要素 ID 之外的所有属性—输入要素中除 FID 之外的所有属性都将传输到输出要素类。</bullet_item><para/>
        ///     <bullet_item>仅要素 ID - 仅将输入要素中的 FID 字段传输到输出要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Attributes To Join")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _join_attributes_value _join_attributes { get; set; } = _join_attributes_value._ALL;

        public enum _join_attributes_value
        {
            /// <summary>
            /// <para>All attributes except feature IDs</para>
            /// <para>All attributes except feature IDs—All the attributes except the FID from the input features will be transferred to the output feature class.</para>
            /// <para>除要素 ID 之外的所有属性—输入要素中除 FID 之外的所有属性都将传输到输出要素类。</para>
            /// </summary>
            [Description("All attributes except feature IDs")]
            [GPEnumValue("NO_FID")]
            _NO_FID,

            /// <summary>
            /// <para>Only feature IDs</para>
            /// <para>Only feature IDs—Only the FID field from the input features will be transferred to the output feature class.</para>
            /// <para>仅要素 ID - 仅将输入要素中的 FID 字段传输到输出要素类。</para>
            /// </summary>
            [Description("Only feature IDs")]
            [GPEnumValue("ONLY_FID")]
            _ONLY_FID,

            /// <summary>
            /// <para>All attributes</para>
            /// <para>All attributes—All the attributes from the input features will be transferred to the output feature class. This is the default.</para>
            /// <para>所有属性—输入要素中的所有属性都将传输到输出要素类。这是默认设置。</para>
            /// </summary>
            [Description("All attributes")]
            [GPEnumValue("ALL")]
            _ALL,

        }

        /// <summary>
        /// <para>Output Point Feature Class</para>
        /// <para>The output points representing the locations where the input lines intersect, including locations where overlapping line segments begin and end.</para>
        /// <para>输出点表示输入线相交的位置，包括重叠线段开始和结束的位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Point Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_point_fc { get; set; } = null;


        /// <summary>
        /// <para>Output Line Feature Class</para>
        /// <para>The output lines representing the overlapping sections that exist between the input lines.</para>
        /// <para>输出行表示输入行之间存在的重叠部分。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Line Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_line_fc { get; set; } = null;


        /// <summary>
        /// <para>Output Intersection Count</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Intersection Count")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long _out_intersection_count { get; set; }


        public Intersect3DLines SetEnv(object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}